<!-- Sofija Puric 6/08 -->
<?php

function dbConnect($db="") {
    $dbcon = mysql_connect("localhost", "sibuser", "sib011")
        or die('Could not connect: ' . mysql_error());
    if ($db != "" and !mysql_select_db($db, $dbcon))
        die('Could not select database: ' . mysql_error());
    return $dbcon;
}
$con=dbConnect("sib");
$fid=$_GET["fid"];
$hid = $_GET["hid"];

$sql = "DELETE FROM feedback WHERE IDFeedback = '$fid'";
$result = mysql_query($sql, $con);
if (!result)
        die('Error: ' . mysql_error());
else header('Location: ../hostel-feedback.php?hid='.$hid.'');  // na toj stranici ne treba vise da postoji izbrisani komentar
mysql_close($con);

?>

